home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 44 / Amiga Format CD44 (1999-08-26)(Future Publishing)(GB)(Track 1 of 3)[!][issue 1999-10].iso / -in_the_mag- / basics / amos / fpaint.lha / fluxpaintpro.amos / fluxpaintpro.amosSourceCode < prev    next >
AMOS Source Code  |  1980-01-14  |  4KB  |  129 lines

  1. '  Flux Paint PRO v0.324 
  2. '
  3. ' simple,but fast drawing proggy 
  4. ' with lots of (graphical) bugs. yeah
  5. '
  6. ' (c) d.lenz 
  7. '
  8. Noise To 1 : L=1
  9. Screen Open 0,320,256,32,Lowres
  10. Flash Off : Curs Off 
  11. Load Iff "fluxres.dat"
  12. Repeat 
  13. Until Mouse Click
  14. Fade 1 : Wait 5
  15. INIT:
  16. Screen Open 0,320,256,32,Lowres
  17. Flash Off : Curs Off : Cls 0
  18. Colour 0,$0
  19. Colour 1,$FFF
  20. Change Mouse 2
  21. C=1 : Paper 0 : Pen 31
  22. Limit Mouse 129,71 To 445,280
  23. _MODE$="-pix-"
  24. Ink C
  25. Bar 1,8 To 20,24
  26. _PIXMODE:
  27. L=1
  28. _MODE$="-pix-"
  29. Locate 3,1 : Print "<Colour";C;"               "
  30. Locate 3,2 : Print "Draw mode:";_MODE$;"                         "
  31. Do 
  32.    XM=X Mouse-128
  33.    YM=Y Mouse-42
  34.    If Mouse Key=1 Then Plot XM,YM,C
  35.    If Mouse Key=2 Then Plot XM,YM,0
  36.    If Key State(20) Then Gosub _PUT_TEXT
  37.    If Key State(2) Then Goto _SPRAYMODE
  38.    If Key State(3) Then Goto _FILLMODE
  39.    If Key State(4) Then Gosub _RNDBACK
  40.    If Key State(64) Then C=C+1 : Gosub _CHANGE_ACTUAL_COLOUR
  41.    If Key State(69) Then Gosub _QUITTEGELB
  42. Loop 
  43. _DRAWING:
  44. Repeat 
  45.    XM=X Mouse-128
  46.    YM=Y Mouse-42
  47.    Plot XM,YM,15
  48. Until Mouse Key=0
  49. Return 
  50. _CHANGE_ACTUAL_COLOUR:
  51. Key Speed 10,1
  52. Ink C
  53. If C>32 Then C=1 : Locate 3,1 : Print "            "
  54. Bar 1,8 To 20,24
  55. Locate 3,1 : Print "<Colour";C
  56. If Mouse Key<>0 Then Return : Else 
  57. Wait 5
  58. Return 
  59. _PUT_TEXT:
  60. Clear Key 
  61. Locate 3,1 : Print "Enter Text:" : Locate 14,1 : Input "";T$
  62. Curs Off 
  63. Pen C : Locate 14,1 : Print T$
  64. Get Bob 0,1,111,6 To 280,15
  65. Pen 31 : Locate 14,1 : Print T$
  66. Change Mouse 1
  67. Do 
  68.    XM=X Mouse-128
  69.    YM=Y Mouse-54
  70.    Bob 1,XM,YM,1
  71.    If Mouse Click=1 Then Paste Bob XM,YM,1
  72.    If Mouse Key=2 Then Bob Off : Change Mouse 2 : If L=1 Then Goto _PIXMODE : If L=2 Then Goto _SPRAYMODE : If L=3 Then Goto _FILLMODE
  73.    If Key State(64) Then C=C+1 : Pen C : Locate 14,1 : Print T$ : Get Bob 0,1,111,6 To 280,15 : Pen 31 : Locate 14,1 : Print T$ : Gosub _CHANGE_ACTUAL_COLOUR
  74.    If Key State(69) Then Bob Off 1 : Change Mouse 2 : If L=1 Then Goto _PIXMODE : If L=2 Then Goto _SPRAYMODE
  75. Loop 
  76. Change Mouse 2
  77. Bob Off 1
  78. Return 
  79. _SPRAYMODE:
  80. L=2
  81. _MODE$="-spray-"
  82. Locate 3,2 : Print "Draw mode:";_MODE$;"                "
  83. Locate 3,1 : Print "<Colour";C;"               "
  84. Do 
  85.    XM=X Mouse-128
  86.    YM=Y Mouse-42
  87.    S1=Rnd(12) : S2=Rnd(15)
  88.    S3=Rnd(12) : S4=Rnd(14)
  89.    If Mouse Key=1 Then Plot XM+S1-S3,YM+S2-S4,C
  90.    If Mouse Key=2 Then Plot XM+S1-S3,YM+S2-S4,0
  91.    If Key State(20) Then Gosub _PUT_TEXT
  92.    If Key State(1) Then Goto _PIXMODE
  93.    If Key State(3) Then Goto _FILLMODE
  94.    If Key State(64) Then C=C+1 : Gosub _CHANGE_ACTUAL_COLOUR
  95.    If Key State(69) Then Gosub _QUITTEGELB
  96. Loop 
  97. _FILLMODE:
  98. _MODE$="-fill-"
  99. Locate 3,2 : Print "Draw mode:";_MODE$;"                  "
  100. Do 
  101.    XM=X Mouse-128
  102.    YM=Y Mouse-42
  103.    If Mouse Key=1 Then Paint XM,YM
  104.    If Mouse Key=2 Then Ink 0 : Paint XM,YM : Ink C
  105.    If Key State(20) Then Gosub _PUT_TEXT
  106.    If Key State(1) Then Goto _PIXMODE
  107.    If Key State(2) Then Goto _SPRAYMODE
  108.    If Key State(64) Then C=C+1 : Gosub _CHANGE_ACTUAL_COLOUR
  109.    If Key State(69) Then Gosub _QUITTEGELB
  110. Loop 
  111. _QUITTEGELB:
  112. Hide 
  113. Locate 3,2 : Print "Really quit? <y/n>"
  114. Wait 15
  115. Repeat 
  116.    E$=Inkey$
  117.    If E$="n" or Key State(69) Then Locate 3,2 : Print "Draw mode:";_MODE$;"                " : Show : Wait 15 : Return 
  118. Until Inkey$="y"
  119. Locate 3,2 : Print "Save picture? <y/n>"
  120. Repeat 
  121.    If Inkey$="n" or Key State(69) Then Fade 2 : Wait 25 : End 
  122. Until Inkey$="y"
  123. Change Mouse 1 : Show 
  124. F$=Fsel$("Work:*.IFF","","Give a name for your pic","and click OK to save")
  125. If F$="" Then Fade 2 : Wait 24 : End 
  126. Cls 0,0,0 To 320,40 : Wait Key : Save Iff F$
  127. Fade 2
  128. Wait 25
  129. End